﻿using Domain.Entities.Tenants;

namespace Domain.Repositories;

/// <summary>
/// 多租户仓储
/// </summary>
public interface IMultiTenantRepository : IScopedDependency
{
    /// <summary>
    /// 获取全部
    /// </summary>
    /// <returns></returns>
    Task<List<Tenant>> GetAllAsync();

    /// <summary>
    /// 获取全部启用的
    /// </summary>
    /// <returns></returns>
    Task<List<Tenant>> GetAllEnabledAsync();

    /// <summary>
    /// 获取默认租户
    /// </summary>
    /// <returns></returns>
    Tenant GetDefault();

    /// <summary>
    /// 添加或更新租户信息
    /// </summary>
    /// <param name="tenant"></param>
    /// <returns></returns>
    Task<bool> AddOrEditAsync(Tenant tenant);
}
